package com.neusoft.demo.server;

import com.neusoft.demo.mapper.UserMapper;
import com.neusoft.demo.pojo.Foods;
import com.neusoft.demo.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServer {
    @Autowired(required = false)
    UserMapper userMapper;
    public User UserLogin(String userName,String password){
        return userMapper.userLogin(userName,password);
    }
    public boolean addUser(User user){
        int n=userMapper.addUser(user);
        if(n>0){
            return  true;
        }else{
            return  false;
        }
    }

}
